/*
Elizabeth Simas	
Title: Ambiguous Rhetoric and Legislative Accountability


HYPOTHESES

Stated-Hyp1: The public will be more inclined to hold legislators accountable for ambiguous campaign promises than when their positions are clear (pages 1). "We challenge the conventional expectation that ambiguous issue positions enable elected officials to vote freely on legislation without fear of public backlash" (p. 2)

	Test-Hyp1: Legislators who had an ambiguous issue positions experience a greater decline in favorability after they vote on the issue in question compared to those who had a clear issue position.

Stated-Hyp2: penalities of ambiguity will be greater for principled issues 
compared to pragmatic issues (page 3).

	Test-Hyp2: Penalties for ambiguity will be greater for principled vs. pragmatic issues.
	
********************************************************************************
NOTES:
	
- DATA ON EXPERIMENTAL MANIPULATION WAS INITIALLY MISSING. 
	We got new data from Jennifer Marek on 02-07-2019.
	This analysis has been updated with the new data.
	
- Respondents are sorted by partyid and see candidates matching their party id. 
They rate favorability of the candidate after seeing a statement by the candidate 
(proposal page 4 and 5). Finally, they see how the candidate voted and then they 
rate favorability again.

- Hypothesis are on propsal pages 2 and 3. 
- The hypotheses pertain to public backlash. The outcome measure most relevant
for this hypothesis is liking after seeing how the candidate voted. The other 
3 outcomes (representation, open-mindedness, and integrity) may or may not 
contribute to liking someone.

*/

clear all
use "TESS012_Simas.dta", clear

********************************************************************************

* INDICATORS OF EXPERIMENTAL MANIPULATIONS

* issue type
	/*transgender rights = principle issue 
	business incentive = pragmatic issue
	*/
	gen issue_principle=1 if Q2==1|Q3==1
	replace issue_principle=0 if Q12==1|Q13==1
	lab def issue 1 "principle" 0 "pragmatic"
	lab val issue_principle issue

	tab issue_principle
	
* ambiguity
	lab def ambiguous 0 "clear" 1 "ambiguous"
	gen ambiguous = 1 if Q2_INSERT==2|Q3_INSERT==2|Q12_INSERT==2|Q13_INSERT==2
	replace ambiguous =0 if Q2_INSERT==1|Q3_INSERT==1|Q12_INSERT==1|Q13_INSERT==1
	lab val ambiguous ambiguous
	
* how did the candidate actually vote: did they "betray"
	// first determine whether candidate in treatment Rep or Dem
	gen dem_candidate= 1 if Q2==1|Q12==1
	replace dem_candidate=0 if Q3==1|Q13==1

	// did candidate support or oppose the legislation
	tab RND_03, mis // trans rights treatment/principle issue
	tab RND_04, mis // business incentive treatment/pragmatic issue
	
	/* legislation details:
	principle legislation:
	"a bill requiring all individuals to use the restroom that corresponds with the gender on their birth certificate"
	
	pragmatic legislation:
	"a bill creating special tax exemptions for large companies creating jobs in the state."
	
	In both cases, supporting the legislation is algined with republican party and 
	opposing is aligned with democratic party.
	*/
	
	tab RND_03 RND_04
	rename RND_03 oppose_principle
	rename RND_04 oppose_pragmatic
	
	// did the candidate betray the party line?

	gen betray =.
	replace betray=1 if dem_candidate==1 & issue_principle==1 & oppose_principle==0 
	replace betray=1 if dem_candidate==1 & issue_principle==0 & oppose_pragmatic==0 	
	replace betray=0 if dem_candidate==1 & issue_principle==1 & oppose_principle==1 
	replace betray=0 if dem_candidate==1 & issue_principle==0 & oppose_pragmatic==1 
	
	replace betray=1 if dem_candidate==0 & issue_principle==1 & oppose_principle==1 
	replace betray=1 if dem_candidate==0 & issue_principle==0 & oppose_pragmatic==1 	
	replace betray=0 if dem_candidate==0 & issue_principle==1 & oppose_principle==0 
	replace betray=0 if dem_candidate==0 & issue_principle==0 & oppose_pragmatic==0 
	
	tab betray, mis
	/* FLAG: there should be no overlap in these two variables; respondents should
	have recieved only one of these treatments. 
	
	The quex shows that respondents were shown only one treatment*/
	
	
	
* CONSTRUCT OUTCOME MEASURES

* how much do you like the candidate (0-10)
	/*NOTE: early questions are about principle issue and later questions are 
	about pragmatic issue
	
	
	Those who answered like 1 and like 2 did not answer like 3 & 4, 
	*/
	
	// like before: 4 & 14
	clonevar like_before = Q4
	replace like_before=Q14 if Q4==.
	
	// like after: 6 and 16
	clonevar like_after = Q6
	replace like_after = Q16 if Q6==.
	
	* recode missing
	foreach var of varlist like* {
	replace `var'=. if `var'==98
	}
	
	foreach var of varlist like* {
	tab `var', mis
	}	
	
	// change in favorability rating
	
	gen decline_favorability = like_before - like_after if like_after!=. & like_before!=.
	tab decline_favorability
	// higher values indicate greater decline; lower values indicate increase in favorability
	
* how well does the candidate represent his constituents?
	clonevar represent = Q7
	replace represent= Q17 if Q7==.
	replace represent=. if represent==98
	
	tab represent, mis
	
* how open-minded is the candidate?
	clonevar openminded = Q8
	replace openminded= Q18 if Q8==.
	replace openminded=. if openminded==98
	
	tab openminded, mis
	
* how much integrity does the candidate have?
	clonevar integrity = Q9 
	replace integrity= Q19 if Q9==.
	replace integrity =. if integrity==98
	
	tab integrity, mis
	

	
********************************************************************************

* ANALYSIS

*Test-Hyp1: Legislators who had an ambiguous issue positions experience a greater decline in favorability after they vote on the issue in question compared to those who had a clear issue position.
	reg decline_favorability i.ambiguous
	* Reject. p=0.000W
	tess 1.ambiguous +, init(Simas880)
	
*Test-Hyp2: Penalties for ambiguity will be greater for principled vs. pragmatic issues.
	reg decline_favorability i.ambiguous##i.issue_principle 
	* Reject. p=0.000W
	tess 1.ambiguous#1.issue_principle +
